<!DOCTYPE html>
<style>#el0::first-letter, #el0:first-child { height: 10px; }</style>
This test passes if it doesn't crash.

<div id='tree' contentEditable><a><img><div id="el0" style="display: -webkit-inline-flex"><pre></pre></div></a></div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

document.querySelector('pre').textContent = 'AA\u0605';
window.getSelection().selectAllChildren(document.getElementById('tree'));
document.execCommand('FormatBlock', false, '<h1>');
</script>
